package com.roads.screen.controller;

import com.roads.common.core.controller.BaseController;
import com.roads.common.core.page.TableDataInfo;
import com.roads.screen.domain.LargeScreen;
import com.roads.screen.service.ILargeScreenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 可视化大屏列表Controller
 *
 * @author nhp
 * @date 2023-10-10
 */
@RestController
@RequestMapping("/screen/screen")
public class LargeScreenController extends BaseController {

    @Autowired
    private ILargeScreenService service;

    /**
     * 查询列表
     */
    @PreAuthorize("@ss.hasPermi('screen:screen:list')")
    @GetMapping("/list")
    public TableDataInfo list(LargeScreen model) {
        startPage();
        List<LargeScreen> list = service.selectModelList(model);
        return getDataTable(list);
    }

}
